package dev.touchswipe.ScreenLock
{
	import dev.touchswipe.ScreenLock.assets.PinButtonGraphic;
	import dev.touchswipe.shared.Fonts;
	
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.text.TextFormatAlign;
	
	public class PinButton extends PinButtonGraphic
	{
		private var _number:int;
		public function get number():int{
			return _number;
		}
		
		private var _textField:TextField=new TextField();
		public function PinButton(number:int)
		{
			_textField=new TextField();
			_number=number;
			var textFmt:TextFormat=new TextFormat(Fonts.SegoeUIL,40,0xFFFFFF);
			textFmt.align=TextFormatAlign.CENTER;
			_textField.defaultTextFormat=textFmt;
			_textField.text=number.toString();
			_textField.width=width;
			_textField.height=height;
			_textField.selectable=false;
			_textField.embedFonts=true;
			addChild(_textField);
		}
	}
}